package com.globefrog.framework.log;
/**
 * 日志设置,后期可以考虑用配置.
 *
 * @author caijinbang
 * @date 2020-11-05 21:07
 */
public class LogSettings {

  /**
   * 日子设置实例.
   */
  private static final LogSettings INSTANCE = new LogSettings();

  /**
   * 是否可以打追踪日志.
   */
  private boolean enableTraceLog = true;

  /**
   * 是否总是写追踪日志.
   */
  private boolean alwaysWriteTraceLog;

  /**
   * 日志消息过滤器.
   */
  private LogMessageFilter logMessageFilter;

  private LogSettings() {

  }

  public static LogSettings getInstance() {
    return INSTANCE;
  }

  public boolean isEnableTraceLog() {
    return enableTraceLog;
  }

  public void setEnableTraceLog(boolean enableTraceLog) {
    this.enableTraceLog = enableTraceLog;
  }

  public boolean isAlwaysWriteTraceLog() {
    return alwaysWriteTraceLog;
  }

  public void setAlwaysWriteTraceLog(boolean alwaysWriteTraceLog) {
    this.alwaysWriteTraceLog = alwaysWriteTraceLog;
  }

  public LogMessageFilter getLogMessageFilter() {
    return logMessageFilter;
  }

  public void setLogMessageFilter(LogMessageFilter logMessageFilter) {
    this.logMessageFilter = logMessageFilter;
  }
}
